﻿/*San Antonio Health Center Patient Information Management System
 * 
 * ==================================
 * Home Page v1.0
 * Changes:
 * -User Interface
 * -Added Images
 * 
 * -----------------------------
 * Date Finished: February 16, 2010
 * Author: Nikko Fernando O. Santillan
 * 
 * ==================================
 *
 * Home Page v1.1
 * Changes:
 * -Linked to logIn page
 *
 * ---------------------------------
 * Date Finished: Ferbruary 21, 2010
 * Author: Nikko Fernando O. Santillan
 * 
 * ==================================
 *
 * Home Page v1.2
 * Changes:
 * -Linked to Search page
 *
 * ---------------------------------
 * Date Finished: Ferbruary 22, 2010
 * Author: Nikko Fernando O. Santillan
 * 
 * ==================================
 * */

/**
 * ==================================
 * Updated by: Monica DM. Tosino
 * Update(s): Graphical User Interface
 * Date Finished: March 1, 2010
 * ==================================
 * **/


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Data.OleDb;

namespace SAHCPIMS
{
    public partial class HOME : Form
    {
        LOGIN logout = new LOGIN();

        public string homeEmpName;
        public int homeEmpNum;

        public HOME()
        {
            InitializeComponent();
        }

        public void putAccountInfo()
        {
            empNumLabel.Text = homeEmpNum.ToString();
            employeeLabel.Text = homeEmpName;
        }

        private void addfamilybutton_Click(object sender, EventArgs e)
        {
            ADDFAMILY addFamilyForm = new ADDFAMILY();
            addFamilyForm.homeEmpName = homeEmpName;
            addFamilyForm.homeEmpNum = homeEmpNum;
            addFamilyForm.putAccountInfo();
            addFamilyForm.Visible = true;
            this.Visible = false;
        }

        private void addmemberbutton_Click(object sender, EventArgs e)
        {
            SEARCH searchFamily = new SEARCH();
            searchFamily.addMemberFlag = 1;
            searchFamily.employeeName = homeEmpName;
            searchFamily.employeeNumber = homeEmpNum;
            searchFamily.putAccountInfo();
            searchFamily.Visible = true;
            this.Visible = false;
        }

        private void searchbutton_Click(object sender, EventArgs e)
        {
            SEARCH searchForm = new SEARCH();
            searchForm.employeeNumber = homeEmpNum;
            searchForm.employeeName = homeEmpName;
            searchForm.putAccountInfo();
            searchForm.Visible = true;
            this.Visible = false;
        }

        private void logOutButton_Click(object sender, EventArgs e)
        {
            logout.Visible = true;
            this.Visible = false;
        }

        private void addcheckupbutton_Click(object sender, EventArgs e)
        {
            this.Visible = false;
            ADDCHECKUP ackup = new ADDCHECKUP();
            ackup.empname = homeEmpName;
            ackup.empnum = homeEmpNum.ToString();
            ackup.Visible = true;
        }



    }
}
